Integrand size = 19, antiderivative size = 69 \[ \int \frac {\tanh (c+d x)}{a+b \sinh (c+d x)} \, dx=\frac {b \arctan (\sinh (c+d x))}{\left (a^2+b^2\right ) d}+\frac {a \log (\cosh (c+d x))}{\left (a^2+b^2\right ) d}-\frac {a \log (a+b \sinh (c+d x))}{\left (a^2+b^2\right ) d} \]
b*arctan(sinh(d*x+c))/(a^2+b^2)/d+a*ln(cosh(d*x+c))/(a^2+b^2)/d-a*ln(a+b*s inh(d*x+c))/(a^2+b^2)/d
Result contains complex when optimal does not.
Time = 0.07 (sec) , antiderivative size = 71, normalized size of antiderivative = 1.03 \[ \int \frac {\tanh (c+d x)}{a+b \sinh (c+d x)} \, dx=\frac {(a-i b) \log (i-\sinh (c+d x))+(a+i b) \log (i+\sinh (c+d x))-2 a \log (a+b \sinh (c+d x))}{2 \left (a^2+b^2\right ) d} \]
((a - I*b)*Log[I - Sinh[c + d*x]] + (a + I*b)*Log[I + Sinh[c + d*x]] - 2*a *Log[a + b*Sinh[c + d*x]])/(2*(a^2 + b^2)*d)
Time = 0.26 (sec) , antiderivative size = 71, normalized size of antiderivative = 1.03, number of steps used = 10, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.474, Rules used = {3042, 26, 3200, 25, 587, 16, 452, 216, 240}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\tanh (c+d x)}{a+b \sinh (c+d x)} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int -\frac {i \tan (i c+i d x)}{a-i b \sin (i c+i d x)}dx\) |
\(\Big \downarrow \) 26 |
\(\displaystyle -i \int \frac {\tan (i c+i d x)}{a-i b \sin (i c+i d x)}dx\) |
\(\Big \downarrow \) 3200 |
\(\displaystyle -\frac {\int -\frac {b \sinh (c+d x)}{(a+b \sinh (c+d x)) \left (\sinh ^2(c+d x) b^2+b^2\right )}d(b \sinh (c+d x))}{d}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {\int \frac {b \sinh (c+d x)}{(a+b \sinh (c+d x)) \left (\sinh ^2(c+d x) b^2+b^2\right )}d(b \sinh (c+d x))}{d}\) |
\(\Big \downarrow \) 587 |
\(\displaystyle -\frac {\frac {a \int \frac {1}{a+b \sinh (c+d x)}d(b \sinh (c+d x))}{a^2+b^2}-\frac {\int \frac {b^2+a \sinh (c+d x) b}{\sinh ^2(c+d x) b^2+b^2}d(b \sinh (c+d x))}{a^2+b^2}}{d}\) |
\(\Big \downarrow \) 16 |
\(\displaystyle -\frac {\frac {a \log (a+b \sinh (c+d x))}{a^2+b^2}-\frac {\int \frac {b^2+a \sinh (c+d x) b}{\sinh ^2(c+d x) b^2+b^2}d(b \sinh (c+d x))}{a^2+b^2}}{d}\) |
\(\Big \downarrow \) 452 |
\(\displaystyle -\frac {\frac {a \log (a+b \sinh (c+d x))}{a^2+b^2}-\frac {a \int \frac {b \sinh (c+d x)}{\sinh ^2(c+d x) b^2+b^2}d(b \sinh (c+d x))+b^2 \int \frac {1}{\sinh ^2(c+d x) b^2+b^2}d(b \sinh (c+d x))}{a^2+b^2}}{d}\) |
\(\Big \downarrow \) 216 |
\(\displaystyle -\frac {\frac {a \log (a+b \sinh (c+d x))}{a^2+b^2}-\frac {a \int \frac {b \sinh (c+d x)}{\sinh ^2(c+d x) b^2+b^2}d(b \sinh (c+d x))+b \arctan (\sinh (c+d x))}{a^2+b^2}}{d}\) |
\(\Big \downarrow \) 240 |
\(\displaystyle -\frac {\frac {a \log (a+b \sinh (c+d x))}{a^2+b^2}-\frac {\frac {1}{2} a \log \left (b^2 \sinh ^2(c+d x)+b^2\right )+b \arctan (\sinh (c+d x))}{a^2+b^2}}{d}\) |
-(((a*Log[a + b*Sinh[c + d*x]])/(a^2 + b^2) - (b*ArcTan[Sinh[c + d*x]] + ( a*Log[b^2 + b^2*Sinh[c + d*x]^2])/2)/(a^2 + b^2))/d)
3.4.51.3.1 Defintions of rubi rules used
Int[(c_.)/((a_.) + (b_.)*(x_)), x_Symbol] :> Simp[c*(Log[RemoveContent[a + b*x, x]]/b), x] /; FreeQ[{a, b, c}, x]
Int[(Complex[0, a_])*(Fx_), x_Symbol] :> Simp[(Complex[Identity[0], a]) I nt[Fx, x], x] /; FreeQ[a, x] && EqQ[a^2, 1]
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*A rcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a , 0] || GtQ[b, 0])
Int[(x_)/((a_) + (b_.)*(x_)^2), x_Symbol] :> Simp[Log[RemoveContent[a + b*x ^2, x]]/(2*b), x] /; FreeQ[{a, b}, x]
Int[((c_) + (d_.)*(x_))/((a_) + (b_.)*(x_)^2), x_Symbol] :> Simp[c Int[1/ (a + b*x^2), x], x] + Simp[d Int[x/(a + b*x^2), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c^2 + a*d^2, 0]
Int[(x_.)/(((c_) + (d_.)*(x_))*((a_) + (b_.)*(x_)^2)), x_Symbol] :> Simp[(- c)*(d/(b*c^2 + a*d^2)) Int[1/(c + d*x), x], x] + Simp[1/(b*c^2 + a*d^2) Int[(a*d + b*c*x)/(a + b*x^2), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c ^2 + a*d^2, 0]
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*tan[(e_.) + (f_.)*(x_)]^(p _.), x_Symbol] :> Simp[1/f Subst[Int[(x^p*(a + x)^m)/(b^2 - x^2)^((p + 1) /2), x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, m}, x] && NeQ[a^2 - b ^2, 0] && IntegerQ[(p + 1)/2]
Time = 1.06 (sec) , antiderivative size = 97, normalized size of antiderivative = 1.41
method | result | size |
derivativedivides | \(\frac {\frac {2 a \ln \left (1+\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )+4 b \arctan \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 a^{2}+2 b^{2}}-\frac {2 a \ln \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} a -2 b \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )-a \right )}{2 a^{2}+2 b^{2}}}{d}\) | \(97\) |
default | \(\frac {\frac {2 a \ln \left (1+\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )+4 b \arctan \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 a^{2}+2 b^{2}}-\frac {2 a \ln \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} a -2 b \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )-a \right )}{2 a^{2}+2 b^{2}}}{d}\) | \(97\) |
risch | \(-\frac {2 a \,d^{2} x}{a^{2} d^{2}+b^{2} d^{2}}-\frac {2 a d c}{a^{2} d^{2}+b^{2} d^{2}}+\frac {2 a x}{a^{2}+b^{2}}+\frac {2 a c}{d \left (a^{2}+b^{2}\right )}+\frac {i \ln \left ({\mathrm e}^{d x +c}+i\right ) b}{\left (a^{2}+b^{2}\right ) d}+\frac {\ln \left ({\mathrm e}^{d x +c}+i\right ) a}{\left (a^{2}+b^{2}\right ) d}-\frac {i \ln \left ({\mathrm e}^{d x +c}-i\right ) b}{\left (a^{2}+b^{2}\right ) d}+\frac {\ln \left ({\mathrm e}^{d x +c}-i\right ) a}{\left (a^{2}+b^{2}\right ) d}-\frac {a \ln \left ({\mathrm e}^{2 d x +2 c}+\frac {2 a \,{\mathrm e}^{d x +c}}{b}-1\right )}{d \left (a^{2}+b^{2}\right )}\) | \(216\) |
1/d*(4/(2*a^2+2*b^2)*(1/2*a*ln(1+tanh(1/2*d*x+1/2*c)^2)+b*arctan(tanh(1/2* d*x+1/2*c)))-2*a/(2*a^2+2*b^2)*ln(tanh(1/2*d*x+1/2*c)^2*a-2*b*tanh(1/2*d*x +1/2*c)-a))
Time = 0.27 (sec) , antiderivative size = 92, normalized size of antiderivative = 1.33 \[ \int \frac {\tanh (c+d x)}{a+b \sinh (c+d x)} \, dx=\frac {2 \, b \arctan \left (\cosh \left (d x + c\right ) + \sinh \left (d x + c\right )\right ) - a \log \left (\frac {2 \, {\left (b \sinh \left (d x + c\right ) + a\right )}}{\cosh \left (d x + c\right ) - \sinh \left (d x + c\right )}\right ) + a \log \left (\frac {2 \, \cosh \left (d x + c\right )}{\cosh \left (d x + c\right ) - \sinh \left (d x + c\right )}\right )}{{\left (a^{2} + b^{2}\right )} d} \]
(2*b*arctan(cosh(d*x + c) + sinh(d*x + c)) - a*log(2*(b*sinh(d*x + c) + a) /(cosh(d*x + c) - sinh(d*x + c))) + a*log(2*cosh(d*x + c)/(cosh(d*x + c) - sinh(d*x + c))))/((a^2 + b^2)*d)
\[ \int \frac {\tanh (c+d x)}{a+b \sinh (c+d x)} \, dx=\int \frac {\tanh {\left (c + d x \right )}}{a + b \sinh {\left (c + d x \right )}}\, dx \]
Time = 0.29 (sec) , antiderivative size = 95, normalized size of antiderivative = 1.38 \[ \int \frac {\tanh (c+d x)}{a+b \sinh (c+d x)} \, dx=-\frac {2 \, b \arctan \left (e^{\left (-d x - c\right )}\right )}{{\left (a^{2} + b^{2}\right )} d} - \frac {a \log \left (-2 \, a e^{\left (-d x - c\right )} + b e^{\left (-2 \, d x - 2 \, c\right )} - b\right )}{{\left (a^{2} + b^{2}\right )} d} + \frac {a \log \left (e^{\left (-2 \, d x - 2 \, c\right )} + 1\right )}{{\left (a^{2} + b^{2}\right )} d} \]
-2*b*arctan(e^(-d*x - c))/((a^2 + b^2)*d) - a*log(-2*a*e^(-d*x - c) + b*e^ (-2*d*x - 2*c) - b)/((a^2 + b^2)*d) + a*log(e^(-2*d*x - 2*c) + 1)/((a^2 + b^2)*d)
Time = 0.29 (sec) , antiderivative size = 121, normalized size of antiderivative = 1.75 \[ \int \frac {\tanh (c+d x)}{a+b \sinh (c+d x)} \, dx=-\frac {\frac {2 \, a b \log \left ({\left | b {\left (e^{\left (d x + c\right )} - e^{\left (-d x - c\right )}\right )} + 2 \, a \right |}\right )}{a^{2} b + b^{3}} - \frac {{\left (\pi + 2 \, \arctan \left (\frac {1}{2} \, {\left (e^{\left (2 \, d x + 2 \, c\right )} - 1\right )} e^{\left (-d x - c\right )}\right )\right )} b}{a^{2} + b^{2}} - \frac {a \log \left ({\left (e^{\left (d x + c\right )} - e^{\left (-d x - c\right )}\right )}^{2} + 4\right )}{a^{2} + b^{2}}}{2 \, d} \]
-1/2*(2*a*b*log(abs(b*(e^(d*x + c) - e^(-d*x - c)) + 2*a))/(a^2*b + b^3) - (pi + 2*arctan(1/2*(e^(2*d*x + 2*c) - 1)*e^(-d*x - c)))*b/(a^2 + b^2) - a *log((e^(d*x + c) - e^(-d*x - c))^2 + 4)/(a^2 + b^2))/d
Time = 2.04 (sec) , antiderivative size = 130, normalized size of antiderivative = 1.88 \[ \int \frac {\tanh (c+d x)}{a+b \sinh (c+d x)} \, dx=\frac {\ln \left ({\mathrm {e}}^{c+d\,x}+1{}\mathrm {i}\right )}{a\,d-b\,d\,1{}\mathrm {i}}-\frac {a\,\ln \left (8\,a^3\,{\mathrm {e}}^{d\,x}\,{\mathrm {e}}^c-b^3-4\,a^2\,b+b^3\,{\mathrm {e}}^{2\,c}\,{\mathrm {e}}^{2\,d\,x}+4\,a^2\,b\,{\mathrm {e}}^{2\,c}\,{\mathrm {e}}^{2\,d\,x}+2\,a\,b^2\,{\mathrm {e}}^{d\,x}\,{\mathrm {e}}^c\right )}{d\,a^2+d\,b^2}+\frac {\ln \left (1+{\mathrm {e}}^{c+d\,x}\,1{}\mathrm {i}\right )\,1{}\mathrm {i}}{-b\,d+a\,d\,1{}\mathrm {i}} \]